1. Field of the Invention
The invention generally relates to a method and a system for processing an image, and more particularly, to a method and a system for generating a panorama.
2. Description of Related Art
According to a conventional technique for generating a panorama, images of a same scene are captured by a camera in different angles, and motions between adjacent images are estimated so as to stitch the images together. However, the motion estimation, and accordingly the generated panorama, may not be accurate if the motions between the images are large.
Recently, a stripe-based panorama generating method has been provided to resolve aforementioned problem. In this method, motions between the images are reduced by capturing more images, and the motion estimation and image stitching are carried out by using only the central portions of the images. Since the motions between images and image distortions are reduced, this technique can produce a panorama with less image capturing limitation and better stitching effect compared to foregoing conventional technique.
FIG. 1 illustrates an example of a conventional stripe-based panorama generating method. Referring to FIG. 1, a camera is continuously moved to capture a plurality of images of an office, wherein most part of the images (including images 110, 120, and 130) are overlapped with each other. Then, images within a central bar area of the images are cropped according to a predetermined window of interest (WOI) (i.e., the cropped images 140, 150, and 160 framed by the dotted lines). Next, a motion estimation is executed on these cropped images. Eventually, the images are stitched together according to the result of the motion estimation, so as to obtain a panorama 170.
FIG. 2 is a flowchart of a conventional panorama generating method. Referring to FIG. 2, before entering the panorama generating stage, a basic image processing is usually performed on a raw image 210 captured by the charge coupled device (CCD) in the camera by using an image processing engine (step S202), wherein the basic image processing includes color filter array interpolation (CFAI), gamut correction, noise reduction, gamma mapping, and sharpness adjustment, etc. The processed image is then sent to a motion estimation module to execute a motion estimation (step S204). Eventually, the camera performs an image stitching and blending procedure according to the result of the motion estimation (step S206), so as to generate a panorama 220.
The accuracy of the motion estimation is highly related to the layout of the scene, the movement direction, and the movement extent. In order to improve the accuracy of the motion estimation, a plurality of continuous images with smaller motions should be used. However, because each image in the image sequence has to be processed by a basic image processing module, more calculations will be carried out if more images are captured. Thus, such a technique increases the computing load of the system and consumes more memory space. Thereby, a panorama generating method in which motion estimation and image processing can be carried out in a simple and quick way is desired, so as to reduce the computing load and memory consumption.